//
//  Brand_ExploreRecommendBrandImg_View_WX.m
//  ZITHER
//
//  Created by weixin on 2019/5/20.
//  Copyright © 2019 weixn. All rights reserved.
//

#import "Brand_ExploreRecommendBrandImg_View_WX.h"

@implementation Brand_ExploreRecommendBrandImg_View_WX

- (instancetype)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    if (self) {
        
        BaseImageV *image = [BaseImageV initCustom:CGRectZero contentMode:2];
        image.image = [UIImage imageNamed:@"探索_阴影"];
        [self addSubview:image];
        [image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.top.right.left.bottom.equalTo(self).offset(0);
        }];
//探索_阴影

        [self addSubview:self.lab];
        [self addSubview:self.image];

        [self.image mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.width.mas_equalTo(60);
            make.centerY.equalTo(self).offset(-15);
            make.centerX.equalTo(self).offset(0);
        }];
        [self.lab mas_makeConstraints:^(MASConstraintMaker *make) {
            make.height.mas_equalTo(16);
            make.centerY.equalTo(self).offset(20);
            make.centerX.equalTo(self).offset(0);
        }];
    }
    return self;
}


-(void)setModelSub:(goodsBrandMyFollowModelSub *)modelSub{
    _modelSub = modelSub;
    [self.image sd_setImage:modelSub.brandLogo];
    self.lab.text = modelSub.brandNameNative;
}

-(BaseImageV *)image{
    if (!_image) {
        _image = [BaseImageV initCustom:CGRectZero contentMode:1];
    }
    return _image;
}

-(BaseLab *)lab{
    if (!_lab) {
        _lab = [BaseLab initCustomLab:@"品牌名称" color:HexColor(0x333333) font:[UIFont fontWithName:@"PingFang-SC-Regular" size:14]];
    }
    return _lab;
}


@end
